﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using TimberSmart.Model.Common;

namespace TimberSmart.Model.Inventory
{
    public class Product
    {
        public int Id { get; set; }

        [Required, MaxLength(50)]
        public string ProductCode { get; set; }

        [Required]
        public string ProductDescription { get; set; }

        public System.DateTime DateCreated { get; set; }

        public bool Active { get; set; }

        [Timestamp]
        public byte[] RowVersion { get; set; }

        //FK's
        public virtual IEnumerable<Group> StockGroups { get; set; }

        [Required]
        public virtual IEnumerable<UOM> StockUOM { get; set; }

        [Required]
        public virtual IEnumerable<UOM> PurchaseUOM { get; set; }

        [Required]
        public virtual IEnumerable<UOM> SellUOM { get; set; } //Need to put more thought into these UOM later
    }
}
